package pc15;

import java.util.Scanner;

public class J09Account {

	public static void main(String[] args) {

		//변수선언
		int aid[] = new int[2], balance[] = new int[2];
		double interestRate[] = new double[2];
		String dateCreated[] = new String[2];
		double monthlyInterestRate[]=new double[2];
		int withDraw[] = new int[2], deposit[] = new int[2];
		
		inputAccount(aid, balance, interestRate, dateCreated, deposit, withDraw);
		getMonthlyInterestRate(monthlyInterestRate, interestRate);
		deposit(balance, deposit);
		withDraw(balance, withDraw);
		
		//잔액, 월간 이자율, 통장 개설날짜 처리

		System.out.print("계좌번호: " + aid[1]);
		System.out.print(", 잔액: " + balance[1]);
		System.out.print(", 개설일: "+dateCreated[1]);
		System.out.print(", 월간 이자율: "+monthlyInterestRate[1]);
	}//main
	
	public static void inputAccount(int[] aid, int[] balance, double[] interestRate, String[] dateCreated, int[] deposit, int[] withDraw){
		Scanner sc = new Scanner(System.in);
		System.out.print("계좌번호: "); aid[1] = sc.nextInt();
		System.out.print("잔액: "); balance[1] = sc.nextInt();
		System.out.print("연간이자율: "); interestRate[1] = sc.nextDouble();
		System.out.print("통장개설일[2014-03-20]: "); dateCreated[1] = sc.next();
		System.out.print("입금금액: "); deposit[1] = sc.nextInt();
		System.out.print("인출금액: "); withDraw[1] = sc.nextInt();
	}
	
	public static void getMonthlyInterestRate(double[] monthlyInterestRate, double[] interestRate){
		monthlyInterestRate[1] = interestRate[1] / 12;

	}
	
	public static void withDraw(int[] balance, int[] withDraw){
		balance[1] -= withDraw[1];

	}
	
	public static void deposit(int[] balance, int[] deposit){
		balance[1] += deposit[1];

	}
	
}//class
